home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 12181 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  32 lines

  1. Path: news.oanet.com!dialin8
  2. From: scorpion@portal.connect.ab.ca
  3. Newsgroups: comp.lang.c
  4. Subject: Bad code
  5. Date: Fri, 29 Mar 96 16:44:58 GMT
  6. Organization: Central News Services
  7. Message-ID: <4jhau8$hrl@hermes.oanet.com>
  8. NNTP-Posting-Host: dialin8.connect.ab.ca
  9. Summary: How come this liitle scragle of code doesn't work?
  10. Keywords: Problems
  11. X-Newsreader: News Xpress Version 1.0 Beta #4
  12.  
  13.     I need to know why a piece of my C code doesn't work . 
  14. it does like:
  15.  
  16.     Object.Vertices+i.X = (long) .....
  17.     Object.Vertices+i.Y = (long).......
  18.     Object.Vertices+i.Z=(long) ........
  19.  
  20.     Vertices is a pointer to a struct with {long X,Y,Z} that 
  21. has been typedef'ed. i is an index vatiable that is added to the 
  22. pointer to make is point to the next {long X,Y,Z} typedef'ed 
  23. struct . When I go to compile , it says "not a struct or union 
  24. type". When I parenthesize Vertices+i , I get an "Identified 
  25. Expected " error . I am somewhat new to C . this problem has been 
  26. plauging wme for a few days . I can't figure it out . Please point 
  27. me in th right direction if you can . Thanx very much in advance . 
  28. :@)
  29.  
  30.     John Smith
  31. scorpion@portal.connect.ab.ca
  32.